// 定义主题色
$primary-color: #458CFB;
$dialog-header-bg: #F9FBFD;
$common-radius: 5px;

.drawer-none-padding {
  position: relative;
  .el-drawer {
    &__body {
      padding: 0;
    }
  }
}
.dialog-none-padding {
  .el-dialog {
    &__body {
      padding: 0;
    }
  }
}

// 全局样式覆盖
.el {
  &-link {
    margin-right: 10px;
  }
  // 按钮
  &-button {
    border-radius: 3px;
    font-family: "AlimamaFangYuan", -apple-system, BlinkMacSystemFont, "Segoe UI",Microsoft YaHei, "Helvetica Neue", Arial, "Noto Sans", sans-serif,"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    &--primary {
      background-color: $primary-color;
      border-color: $primary-color;
      color: #fff;
      
      &:hover {
        background-color: darken($primary-color, 5%);
        border-color: darken($primary-color, 5%);
        // color: #fff;
      }
    }
  }
  &-divider {
    &--horizontal {
      border-top: 1px #e6e6e6 solid
    }
    &__text {
      background-color: #dbedff;
      padding-top: 3px;
      padding-bottom: 3px;
      color: #22A5F7;
      border-radius: 3px;
    }
  }

  // 输入框
  &-input {
    &__inner,
    &__wrapper,
    &__prefix,
    &__suffix,
    &__prefix-inner,
    &__suffix-inner {
      border-radius: 5px !important;
      font-family: "AlimamaFangYuan", -apple-system, BlinkMacSystemFont, "Segoe UI",Microsoft YaHei, "Helvetica Neue", Arial, "Noto Sans", sans-serif,"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    }
    
    &.el-input--small {
      .el-input__inner,
      .el-input__wrapper,
      .el-input__prefix,
      .el-input__suffix,
      .el-input__prefix-inner,
      .el-input__suffix-inner {
        border-radius: 5px !important;
        height: 26px;
      }
    }
    
    &.el-input--large {
      .el-input__inner,
      .el-input__wrapper,
      .el-input__prefix,
      .el-input__suffix,
      .el-input__prefix-inner,
      .el-input__suffix-inner {
        border-radius: 5px !important;
      }
    }
  }

  // 表单相关组件
  &-select,
  &-time-select,
  &-tree-select {
    &__wrapper,
    &__inner,
    &__input,
    &__tags,
    &__selection {
      border-radius: 5px !important;
    }

    &.el-select--small {
      .el-select__inner,
      .el-select__wrapper,
      .el-select__prefix,
      .el-select__suffix,
      .el-select__prefix-inner,
      .el-select__suffix-inner {
        border-radius: 5px !important;
        height: 28px;
      }
    }
  }

  &-textarea {
    &__inner {
      border-radius: 5px !important;
    }
    
    &__wrapper {
      border-radius: 5px !important;
    }
  }

  &-range-editor--small.el-input__wrapper {
    height: 28px;
  }

  // 对话框
  &-dialog {
    border-radius: 5px;
    padding: 0 !important;
    
    &__header {
      // background: $dialog-header-bg;
      padding: 0;
      margin: 0;
      border-radius: 5px;
      // border-bottom: 1px solid #ebeef5;
      
      .el-dialog__title {
        padding: 12px 20px;
        display: block;
        font-size: 17px;
        font-weight: 550;
        padding: 8px 20px;
      }
    }

    &__body {
      padding: 20px;
    }

    &__footer {
      padding: 0 20px 20px 20px;
    }
  }

  &-drawer {
    &__header {
      // background: $dialog-header-bg;
      padding: 15px 20px;
      margin: 0;
      padding: 8px 20px;
      border-radius: 5px;
      // border-bottom: 1px solid #ebeef5;
    }
    &__title {
      color: #303133;
      font-size: 17px;
      font-weight: 550;
    }
  }

  // 菜单
  &-menu {
    border-radius: 5px;
    background-color: transparent;
  }

  // 表格
  &-table {
    border-radius: 5px;
    --el-table-border-color: none;
    &__header {
      font-size: 14px;
    }
    
    th {
      background-color: #f5f7fa;
    }
  }

  // 分页
  &-pagination {
    &__total {
      color: #666;
    }
  }

  // 卡片
  &-card {
    border-radius: 5px;
  }

  // 标签
  &-tag {
    border-radius: 5px !important;
    border: none;
    
    &--small {
      border-radius: 5px !important;
    }
    
    &--large {
      border-radius: 5px !important;
    }
  }

  // 弹出组件
  &-message,
  &-alert,
  &-confirm {
    &__wrapper {
      border-radius: 5px !important;
    }
    
    &__content {
      border-radius: 5px !important;
    }
    
    &__btns {
      border-radius: 5px !important;
    }
  }

  // 消息提示
  &-message {
    border-radius: 5px !important;
    &-box {
      --el-messagebox-border-radius: 5px;
    }
    &__content {
      color: #303133 !important;
      font-size: 13px;
    }
  }

  // 步骤条
  &-steps {
    &--simple {
      padding: 10px 8%;
    }
    .el-step {
      &__head.is-finish {
        border-color: #a8abb2;
        color: #a8abb2;
      }
      &__main {
        .el-step__title {
          font-size: 15px;
        }
        .el-step__title.is-finish {
          color: #a8abb2;
        }
      }
    }
  }
  &-form {
    &-item {
      &__error {
        padding-top: 4px;
      }
      &--label-top .el-form-item__label {
        margin-bottom: 5px;
      }
    }
  }
}
